package lt.inkredibl.iit.action;

import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;

import javax.swing.AbstractAction;
import javax.swing.Action;

import lt.inkredibl.iit.ImgComponent;

@SuppressWarnings("serial")
public class ActClearCorners
	extends AbstractAction
{
	private ImgComponent _ic;

	protected ActClearCorners(ImgComponent ic)
	{
		_ic = ic;
		
		putValue(Action.NAME, "Clear corners");
		putValue(Action.MNEMONIC_KEY, KeyEvent.VK_C);
	}
	
	public void actionPerformed(ActionEvent e)
	{
		_ic.clearCorners();
	}

	public static ActClearCorners inst(ImgComponent ic)
	{
		return new ActClearCorners(ic);
	}

}
